Each form element you use has a name. When the visitor submits a form, you are e-mailed the name of the form element along with the visitor’s input into that form element.
For example, assume you have used a text element with the name namebox. If a visitor to your webpage enters J. Dee into that text box and then submits the form, you would be e-mailed the following text:
&namebox=J.+Dee
The above output is generated by this HTML code:
<INPUT TYPE="text" NAME="namebox" VALUE="Enter your name here" >
There are two things to notice here. One is that the visitor’s reply is prefaced by the name of the text box that was used. This highlights the importance of giving all form elements meaningful names. The second is that the form is not very readable. Strange characters have been inserted into the text. These characters are the result of the format that browsers use to submit the details of the form. If you want to format the data into a more readable form you need to use CGI.
NOTE |
Many newer browsers no longer support this feature. Read on to see how you can still receive data from forms. |
CGI (Common Gateway Interface) is a computer language, commonly PERL, that reads and reacts to a visitor’s form submission. The CGI program must be stored on a server. Usually this is the server where you store your HTML files. If you want to use more powerful aspects of HTML, such as setting up a searchable database on a server, you will need access to the server and a lot of programming experience that is beyond the scope of this help. Furthermore, most ISPs are reluctant to let you place your own CGI programs on their server as CGI programs can be security risks.
However, all is not lost. Most ISPs already have some CGI programs on their server for you to use and one of these scripts is usually designed to clean up the output of form-submitted data, make it more readable and then e-mail it to you. To use this resource you will have to e-mail your ISP to get the particulars. However, the HTML code will look similar to the code below:
Instead of submitting your form as follows:
<FORM METHOD=POST ACTION="mailto:your@email.address">
use:
<FORM METHOD="get" ACTION="/cgi-bin/forms.cgi">
The ACTION here is pointing to the CGI script on a server. Of course your ACTION path will be dependant upon the details your ISP e-mails you.
Users of Microsoft Internet Explorer cannot use forms to submit their information to an e-mail address in the basic form described above. However, your ISP may well have a solution to this problem, so send them an e-mail!
You will notice some difficulty in sizing the form elements. This is a problem with the way that browsers render the form elements and is not a bug in HotDog. You may have to try experimenting with different sizes to get the effect you desire. Try putting only one form element per table cell.